/**
 * 烧杯
 */
Beaker = Widget.extend({
	ctor:function(parent){
		this._super();
		parent.addChild(this,23);
		this.setTag(TAG_BEAKER);
		this.init();
	},
	init : function(){
		this.setVisible(false);
		this.setCascadeOpacityEnabled(true);
		//烧杯1号（左边）--水
		var beaker1 = new Button(this, 10, TAG_BEAKER1, "#lib/water.png",this.callback);
		beaker1.setPosition(cc.p(450,368));
		beaker1.setScale(0.5);
		//烧杯2号（右边）--砂石
		var beaker2 = new Button(this, 10, TAG_BEAKER2, "#lib/sand.png",this.callback);
		beaker2.setPosition(cc.p(874,359));
		beaker2.setScale(0.5);
	},	
	beakerBubble : function(){
		var bubble = new cc.Sprite("#run/bubble.png");
		this.addChild(bubble,9);
		var x = Math.random(1)*50;
		bubble.setPosition(cc.p(432 + x, 302));
		bubble.runAction(cc.sequence(cc.fadeIn(1),cc.moveBy(1, 0 , 46),cc.callFunc(function() {
			bubble.removeFromParent(true);
		}, this)));
	},
	callback:function(p){
		var action = gg.flow.flow.action;
		switch(p.getTag()){
		case TAG_BEAKER2:
	
			break;
		default:
			break;
		}
	}
});
